<template>
    <div id="swiperTop">
  <van-swipe :autoplay="3000" >
  <van-swipe-item v-for="image in images" :key="image" >
    <img :src="image" />
    
    </van-swipe-item>
    </van-swipe>
  </div>
</template>

<script>
 import { mapMutations } from 'vuex';
   export default {
  setup() {
    const images = [
      'https://fastly.jsdelivr.net/npm/@vant/assets/apple-1.jpeg',
      'https://fastly.jsdelivr.net/npm/@vant/assets/apple-2.jpeg',
    ];
    return { images };
  },
  data(){
    return {
        singSwpierTop:[],

    };
  },
  created(){
    this.getSingSwpier()
  },
  methods:{
    ...mapMutations(["setIsMain"]),
    //获取轮播图数据
    getSingSwpier(){
        
    }

    // viewSingerSong(id) {
    //   this.setIsMain(false);
    //   this.$router.push({ name: "SingerSong", params: { id } });
    // },
  },

};
</script>

<style lang="less" scoped>
    #swiperTop{
        .van-swipe{
            width: 100%;
            height: 3rem;
            .van-swipe-item{
                // padding: 0 0.2rem;
                img{
                    width: 100%;
                    height: 100%;
                    border-radius: 0.2rem;
                }
            }
            /deep/.van-swipe__indicator--active{
                background-color: rgb(219, 130, 130);
            }
        }
    }
</style>